<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>新增授信申请提单</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../plugins/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="../../plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../css/common.css">
</head>

<body style="padding: 0 5px;">
    <div class="layui-tab layui-tab-card">
        <ul class="layui-tab-title">
            <li class="layui-this">授信申请提单</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form" action="">
                    <div class="layui-fluid">
                        <div class="layui-row">
                            <div class="layui-col-md4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">产品类型:</label>
                                    <div class="layui-input-block">
                                        <select name="ptype" lay-verify="required">
                                            <option value=""></option>
                                            <option value="xyd">信用贷</option>
                                            <option value="xsd">新生贷</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md4">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">经销商编号:</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="dealerNo" placeholder="请输入" lay-verify="required" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-md4">
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button type="button" lay-filter="search" class="layui-btn" id="search">查询</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div style="display: none; margin-top: 15px;" id="content">
                            <!--start 法人基本信息-->
                            <div>
                                <label class="field-title">法人基本信息</label>
                                <div class="field-body field-readonly">
                                    <div>
                                        <label class="layui-form-label">法人姓名:</label>
                                        <div>
                                            <input type="text" name="dealerName" value="蒋小平" autocomplete="off" class="layui-input" readonly>
                                        </div>
                                        <label class="layui-form-label">证件号码:</label>
                                        <div>
                                            <input type="text" name="identity" value="320212198909120215" autocomplete="off" class="layui-input" readonly>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label">手机号码:</label>
                                        <div>
                                            <input type="text" name="telephone" value="18221287100" autocomplete="off" class="layui-input" readonly>
                                        </div>
                                        <label class="layui-form-label">性别:</label>
                                        <div>
                                            <input type="text" name="gender" value="男" autocomplete="off" class="layui-input" readonly>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label">证件类型:</label>
                                        <div>
                                            <input type="text" name="identityType" value="身份证" autocomplete="off" class="layui-input" readonly>
                                        </div>
                                        <label class="layui-form-label">法人户籍地址:</label>
                                        <div>
                                            <input type="text" name="address" value="湖北省武汉市江夏区吴光路1102号" autocomplete="off" class="layui-input" readonly>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label">操作人核身:</label>
                                        <div>
                                            <input type="text" name="operaterCheck" value="已通过" autocomplete="off" class="layui-input" readonly>
                                        </div>
                                        <label class="layui-form-label"></label>
                                        <div></div>
                                    </div>
                                </div>
                            </div>
                            <!--end 法人基本信息-->
                            <!--start 补充法人信息-->
                            <div>
                                <label class="field-title">补充法人信息</label>
                                <div class="field-body">
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>婚姻状况:</label>
                                        <div>
                                            <select name="marriage" lay-verify="required">
                                                <option value=""></option>
                                                <option value="0">未婚</option>
                                                <option value="1">已婚</option>
                                            </select>
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>直系亲属关系:</label>
                                        <div>
                                            <select name="linealKinship" lay-verify="required">
                                                <option value=""></option>
                                                <option value="0">父母</option>
                                                <option value="1">夫妻</option>
                                                <option value="2">子女</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>家庭人数:</label>
                                        <div>
                                            <input type="text" name="number" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>直系亲属姓名:</label>
                                        <div>
                                            <input type="text" name="linealName" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>居住地址:</label>
                                        <div style="display: flex;">
                                            <select name="province" lay-verify="required" style="flex: 1;">
                                                <option value="" disabled="">省</option>
                                            </select>
                                            <i style="flex-basis: 15px;"></i>
                                            <select name="city" lay-verify="required" style="flex: 1;">
                                                <option value="">市</option>
                                            </select>
                                            <i style="flex-basis: 15px;"></i>
                                            <select name="area" lay-verify="required" style="flex: 1;">
                                                <option value="">区</option>
                                            </select>
                                            <i style="flex-basis: 15px;"></i>
                                            <input type="text" name="detailedAddress" autocomplete="off" class="layui-input" lay-verify="required" placeholder="详细地址" style="flex: 2;">
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>直系亲属手机号:</label>
                                        <div>
                                            <input type="text" name="linealTel" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                        <label class="layui-form-label"></label>
                                        <div></div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"></label>
                                        <div>
                                            <button type="button" lay-filter="save" class="layui-btn layui-btn-normal" lay-submit>保存</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--end 补充法人信息-->
                            <!--start 基本经营信息-->
                            <div>
                                <label class="field-title">基本经营信息</label>
                                <div class="field-body field-readonly">
                                    <div>
                                        <label class="layui-form-label">经销商名称:</label>
                                        <div>
                                            <input type="text" name="" value="小牛车行" autocomplete="off" class="layui-input" readonly>
                                        </div>
                                        <label class="layui-form-label">店铺地址:</label>
                                        <div>
                                            <input type="text" name="" value="湖北省武汉市江夏区吴光路1102号" autocomplete="off" class="layui-input" readonly>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label">营业执照类型:</label>
                                        <div>
                                            <input type="text" name="" value="营业执照" autocomplete="off" class="layui-input" readonly>
                                        </div>
                                        <label class="layui-form-label">营业执照状态:</label>
                                        <div>
                                            <input type="text" name="" value="存续" autocomplete="off" class="layui-input" readonly>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label">营业执照编号:</label>
                                        <div>
                                            <input type="text" name="" value="320212198909120215" autocomplete="off" class="layui-input" readonly>
                                        </div>
                                        <label class="layui-form-label">营业执照注册日期:</label>
                                        <div>
                                            <input type="text" name="" value="2017年1月3日" autocomplete="off" class="layui-input" readonly>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label">营业执照经营范围:</label>
                                        <div>
                                            <input type="text" name="" value="销售电动车、电动车配件、电动车维修，及其技术服务" autocomplete="off" class="layui-input" readonly>
                                        </div>
                                        <label class="layui-form-label"></label>
                                        <div></div>
                                    </div>
                                </div>
                            </div>
                            <!--end 基本经营信息-->
                            <!--start 补充经营信息-->
                            <div>
                                <label class="field-title">补充经营信息</label>
                                <div class="field-body">
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>店内员工人数:</label>
                                        <div>
                                            <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>经营年限:</label>
                                        <div>
                                            <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>经营场所面积:</label>
                                        <div>
                                            <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>合作年限:</label>
                                        <div>
                                            <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>常用银行卡:</label>
                                        <div>
                                            <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                        <label class="layui-form-label"></label>
                                        <div></div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"></label>
                                        <div>
                                            <button type="button" lay-filter="save" class="layui-btn layui-btn-normal" lay-submit>保存</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--end 补充经营信息-->
                            <!--start 销售情况信息-->
                            <div>
                                <label class="field-title">销售情况信息</label>
                                <div class="field-body">
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>年总销量（台）:</label>
                                        <div>
                                            <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>年总销售额（万元）:</label>
                                        <div>
                                            <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                    </div>
                                    <!-- <div class="sales">
                                        <div>
                                            <label class="layui-form-label"><i class="required">*</i>销售品牌:</label>
                                            <div>
                                                <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                            </div>
                                            <label class="layui-form-label"></label>
                                            <div></div>
                                        </div>
                                        <div>
                                            <label class="layui-form-label"><i class="required">*</i>年销量（台）:</label>
                                            <div>
                                                <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                            </div>
                                            <label class="layui-form-label"><i class="required">*</i>年销售额（万元）:</label>
                                            <div>
                                                <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                            </div>
                                        </div>
                                    </div> -->
                                    <div>
                                        <label class="layui-form-label">
                                            <button type="button" lay-filter="add" class="layui-btn layui-btn-warm" id="add"><i class="fa fa-plus"></i>&nbsp;&nbsp;添加品牌</button>
                                        </label>
                                        <div>
                                            <button type="button" lay-filter="save" class="layui-btn layui-btn-normal" lay-submit>保存</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--end 销售情况信息-->
                            <!--start 供应链—层级-->
                            <div>
                                <label class="field-title">供应链—层级</label>
                                <div class="field-body">
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>经销商级别:</label>
                                        <div>
                                            <select name="" lay-verify="required">
                                                <option value=""></option>
                                                <option value="0">1</option>
                                                <option value="1">2</option>
                                                <option value="2">3</option>
                                            </select>
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>上级经销商名称:</label>
                                        <div>
                                            <select name="" lay-verify="required">
                                                <option value=""></option>
                                                <option value="0">11</option>
                                                <option value="1">22</option>
                                                <option value="2">33</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>上级经销商法人手机号:</label>
                                        <div>
                                            <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>上级经销商法人身份证:</label>
                                        <div>
                                            <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"></label>
                                        <div>
                                            <button type="button" lay-filter="save" class="layui-btn layui-btn-normal" lay-submit>保存</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--end 供应链—层级-->
                            <!--start 供应链—核心企业-->
                            <div>
                                <label class="field-title">供应链—核心企业</label>
                                <div class="field-body">
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>经营类别:</label>
                                        <div>
                                            <select name="" lay-verify="required">
                                                <option value=""></option>
                                                <option value="0">11</option>
                                                <option value="1">22</option>
                                                <option value="2">33</option>
                                            </select>
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>经营品类:</label>
                                        <div>
                                            <select name="" lay-verify="required">
                                                <option value=""></option>
                                                <option value="0">11</option>
                                                <option value="1">22</option>
                                                <option value="2">33</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>经营品牌:</label>
                                        <div>
                                            <select name="" lay-verify="required">
                                                <option value=""></option>
                                                <option value="0">11</option>
                                                <option value="1">22</option>
                                                <option value="2">33</option>
                                            </select>
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>核心企业:</label>
                                        <div>
                                            <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--end 供应链—核心企业-->
                            <!--start 供应链—打款工厂-->
                            <div>
                                <label class="field-title">供应链—打款工厂</label>
                                <div class="field-body">
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>选择打款方式:</label>
                                        <div>
                                            <input type="radio" name="cash" value="moren" title="默认打款工厂" checked>
                                            <input type="radio" name="cash" value="guding" title="固定打款工厂">
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>打款工厂:</label>
                                        <div>
                                            <select name="" lay-verify="required">
                                                <option value=""></option>
                                                <option value="0">默认打款工厂</option>
                                                <option value="1">固定打款工厂</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"></label>
                                        <div>
                                            <button type="button" lay-filter="save" class="layui-btn layui-btn-normal" lay-submit>保存</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--end 供应链—打款工厂-->
                            <!--start 担保信息-->
                            <div class="xsd" style="display: none;">
                                <label class="field-title">担保信息</label>
                                <div class="field-body">
                                    <div>
                                        <label class="layui-form-label">是否担保:</label>
                                        <div>
                                            <select name="">
                                                <option value=""></option>
                                                <option value="0">是</option>
                                                <option value="1">否</option>
                                            </select>
                                        </div>
                                        <label class="layui-form-label">担保比率:</label>
                                        <div>
                                            <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label">担保人类型:</label>
                                        <div>
                                            <select name="">
                                                <option value=""></option>
                                                <option value="0">111</option>
                                                <option value="1">222</option>
                                            </select>
                                        </div>
                                        <label class="layui-form-label">担保人:</label>
                                        <div>
                                            <select name="">
                                                <option value=""></option>
                                                <option value="0">fd</option>
                                                <option value="1">sd</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"></label>
                                        <div>
                                            <button type="button" lay-filter="save" class="layui-btn layui-btn-normal" lay-submit>保存</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--end 担保信息-->
                            <!--start 还款银行卡信息-->
                            <div>
                                <label class="field-title">还款银行卡信息</label>
                                <div class="field-body">
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>账户类型:</label>
                                        <div>
                                            <input type="text" name="" autocomplete="off" class="layui-input" value="个人" readonly style="border: 0;" lay-verify="required">
                                        </div>
                                        <label class="layui-form-label"></label>
                                        <div>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>开户行:</label>
                                        <div>
                                            <select name="" lay-verify="required">
                                                <option value=""></option>
                                                <option value="0">农业银行</option>
                                                <option value="1">中国银行</option>
                                            </select>
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>开户名:</label>
                                        <div>
                                            <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>银行预留手机号:</label>
                                        <div>
                                            <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>银行卡号:</label>
                                        <div>
                                            <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"></label>
                                        <div>
                                            <button type="button" lay-filter="save" class="layui-btn layui-btn-normal" lay-submit>保存</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--end 还款银行卡信息-->
                            <!--end 补充附件-->
                            <div>
                                <label class="field-title">补充附件</label>
                                <div class="field-body">
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>营业执照照片:</label>
                                        <div>
                                            <button type="button" class="layui-btn" id="yyzz"><i class="layui-icon">&#xe67c;</i>选择图片</button>
                                        </div>
                                        <label class="layui-form-label"></label>
                                        <div>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>身份证正面照片:</label>
                                        <div>
                                            <button type="button" class="layui-btn" id="yyzz"><i class="layui-icon">&#xe67c;</i>选择图片</button>
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>身份证反面照片:</label>
                                        <div>
                                            <button type="button" class="layui-btn" id="yyzz"><i class="layui-icon">&#xe67c;</i>选择图片</button>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>还款银行卡正面照片:</label>
                                        <div>
                                            <button type="button" class="layui-btn" id="yyzz"><i class="layui-icon">&#xe67c;</i>选择图片</button>
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>还款银行卡反面照片:</label>
                                        <div>
                                            <button type="button" class="layui-btn" id="yyzz"><i class="layui-icon">&#xe67c;</i>选择图片</button>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>人行征信报告:</label>
                                        <div>
                                            <button type="button" class="layui-btn" id="yyzz"><i class="layui-icon">&#xe67c;</i>选择图片</button>
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>银行卡流水:</label>
                                        <div>
                                            <button type="button" class="layui-btn" id="yyzz"><i class="layui-icon">&#xe67c;</i>选择图片</button>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>信用袋申请书:</label>
                                        <div>
                                            <button type="button" class="layui-btn" id="yyzz"><i class="layui-icon">&#xe67c;</i>选择图片</button>
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>授权承诺书:</label>
                                        <div>
                                            <button type="button" class="layui-btn" id="yyzz"><i class="layui-icon">&#xe67c;</i>选择图片</button>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>店面门头照片:</label>
                                        <div>
                                            <button type="button" class="layui-btn" id="yyzz"><i class="layui-icon">&#xe67c;</i>选择图片</button>
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>店内照片:</label>
                                        <div>
                                            <button type="button" class="layui-btn" id="yyzz"><i class="layui-icon">&#xe67c;</i>选择图片</button>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="layui-form-label"><i class="required">*</i>与老板合照照片:</label>
                                        <div>
                                            <button type="button" class="layui-btn" id="yyzz"><i class="layui-icon">&#xe67c;</i>选择图片</button>
                                        </div>
                                        <label class="layui-form-label"><i class="required">*</i>其他相关照片:</label>
                                        <div>
                                            <button type="button" class="layui-btn" id="yyzz"><i class="layui-icon">&#xe67c;</i>选择图片</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--end 补充附件-->
                        </div>
                    </div>

                    <div style="display: flex; justify-content: center; margin-top: 15px;">
                        <button type="button" class="layui-btn layui-btn-small layui-btn-normal" lay-submit lay-filter="submit">提交</button>
                        <div style="flex-basis: 60px;"></div>
                        <button type="button" class="layui-btn layui-btn-small layui-btn-normal" lay-submit lay-filter="save">保存</button>
                    </div>
                </form>
            </div>
            <button  type="button" class="layui-btn view">测试查看查看1</button>
        </div>
    </div>
    <script type="text/javascript" src="../../plugins/layui/layui.js"></script>
    <script>
    var brandNum = 1;
    var $, layer;

    layui.use(['form', 'jquery', 'layer', 'upload'], function() {
        var layerTips = parent.layer === undefined ? layui.layer : parent.layer, //获取父窗口的layer对象
            form = layui.form,
            upload = layui.upload;
        $ = layui.jquery;
        layer = layui.layer; //获取当前窗口的layer对象;
        
        $('.view').bind('click', function(){
            /*var src = [];
            $(this).parent().find('img').each(function(){
                src.push($(this).attr('layer-src'));
            });*/
            window.open("view.html");
            /*parent.tab.tabAdd({
                href: 'supplychain/credit/view.html?fragments='+$('#layer-photos-demo').html(), //地址
                icon: 'fa fa-plus',
                title: '查看图片'
            });*/
        });

        //添加品牌
        $('#add').bind('click', function(){
            $(this).parent().parent().before(`<div class="sales">
                <div>
                    <label class="layui-form-label"><i class="required">*</i>销售品牌:</label>
                    <div>
                        <input type="text" name="brand${brandNum}" autocomplete="off" class="layui-input" lay-verify="required">
                    </div>
                    <label class="layui-form-label"></label>
                    <div style="color: red;" class="sales-del"><i class="fa fa-minus-square" onclick="del(this)"></i></div>
                </div>
                <div>
                    <label class="layui-form-label"><i class="required">*</i>年销量（台）:</label>
                    <div>
                        <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                    </div>
                    <label class="layui-form-label"><i class="required">*</i>年销售额（万元）:</label>
                    <div>
                        <input type="text" name="" autocomplete="off" class="layui-input" lay-verify="required">
                    </div>
                </div>
            </div>`);
            brandNum++;
        });
        
        /**
         * 功能：查询
         * 输入参数：产品类型 ，经销商编号
         * 返回值：授信申请信息
         */
        $('#search').bind('click', function(){
            var ptype = $('select[name=ptype]').val();
            if(ptype === ''){
                layer.msg('必填项不能为空', {icon:5,shift:6});
            }else{
                $('#content').show();
                $('#add').trigger('click');
            }
        });

        //监听搜索表单的提交事件
        /*form.on('submit(search)', function(data) {
            console.log(data);
            // $.ajax({
            //     type: "GET",
            //     url: baseURL + "",
            //     dataType: "json",
            //     async: false,
            //     success: function(data) {
            //         if (data.code == "200") {

            //         } else {
            //             layer.alert(data.msg);
            //         }
            //     }
            // });

            return false;
        });*/

        //执行实例
        var uploadInst = upload.render({
            elem: '#yyzz', //绑定元素
            url: '/upload/', //上传接口
            done: function(res, index, upload) {
                //上传完毕回调
            },
            error: function() {
                //请求异常回调
            }
        });


    });

    //删除销售品牌
    function del(obj){
        if($('.sales').length > 1){
            $(obj).parent().parent().parent().remove();
        }else{
            layer.msg('总得有个销售品牌吧', {icon:5,shift:6});
        }
    }
    </script>
</body>

</html>
